//JBW::4/22/08
package com.modestmaps.events
{
	// This class is an extension to the modestmaps mapping API version 1.0 for Actionscript 3.
	// see http://www.modestmaps.com for details on the modestmaps API.
	// 4/24/08 Jay Wood  / San Diego Union-Tribune
	import flash.events.Event;
	import com.modestmaps.extras.Overlay;

	/**
	 * A custom event class for PolylineOverlay -- dispatched when the overlay is clicked. 
 	 * @see http://www.modestmaps.com the official ModestMaps site
 	 * @see com.modestmaps.extras.PolylineOverlay PolylineOverlay
	 */
	public class OverlayEvent extends Event
	{
		/** event type indicates the mouse was clicked on an overlay */
	    public static const OVERLAY_CLICKED:String = 'overlayClicked';

	    /** store a handle to the overlay where the event occurred */
		public var overlay:Overlay;
		
		/**
		 * Constructs a new OverlayEvent instance.
		 * @param overlay is a handle on the overlay where the mouse click occurred.
		 * @param type specifies the event type.
		 */
		public function OverlayEvent(overlay:Overlay, type:String, 
			bubbles:Boolean=true, cancelable:Boolean=false)
		{
			this.overlay = overlay;
			super(type, bubbles, cancelable);
		}
	}
}